package com.appkubes.mall.restful.application.goods.sku.dao;

import com.appkubes.mall.core.dao.BaseMallSpecificAttributeDao;
import com.appkubes.mall.restful.application.goods.sku.model.AttributeModel;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface SpecificAttributeDao extends BaseMallSpecificAttributeDao {

    @Select("SELECT specific_attribute_name as name, specific_attribute_code as code FROM mall_specific_attribute WHERE app_key=#{appKey} AND specific_type_key=#{typeKey} ORDER BY specific_attribute_index desc")
    List<AttributeModel> getList(@Param("appKey") String appKey, @Param("typeKey") String typeKey);
}
